<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="/djzx/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/djzx/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript">
function toCommunityParty(){
	window.location.href = "/djzx/CommunityPartyAction!getPartyInfoListForPage.action";
}

function toLXParty(){
	window.location.href = "/djzx/LXPartyAction!getPartyInfoListForPage.action";
}

function toOtherParty(){
	window.location.href = "/djzx/OtherPartyAction!getPartyInfoListForPage.action";
} 

<%-- $(document).ready(function(){
	setTimeout('test()',70 * 1000); 
});

function test(){
	var a = '<%=session.getAttribute("adminKey")%>';
	alert(a);
} --%>
</script>
<style type="text/css">

#main_btn{
	/* width: 354px; */
	width: 678px;
	margin: 40px auto;
	overflow: hidden;
}
.child_btn{
	/* width: 108px; */
	width: 216px;
	/* height: 200px; */
	height: 240px;
	text-align: center;
	margin-left: 10px;
	float: left;
	cursor: pointer;
}

.child_btn img{
	height: 216px;
}

.child_btn span{
	font-size: 13px;
	font-family: "Microsoft YaHei" ! important;
}
</style>
</head>

<body>
<div style="display: none;" id="thisMonthRemind">
<s:iterator value="thisMonthRemindList" var="t" status="statu">
<div>${t.happenDate }</div>
</s:iterator>
</div>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
  	<!-- 主界面中心start -->
    <td align="center" valign="top" background="/djzx/images/main_17.gif">
    	<div id="main_btn">
	    	<div class="child_btn" onclick="toCommunityParty()">
	    		<img alt="居民区党组织" src="/djzx/images/jmq.jpg">
	    		<span>居民区</span>
	    	</div>
	    	<div class="child_btn" onclick="toLXParty()">
	    		<img alt="两新组织党组织" src="/djzx/images/lx.jpg">
	    		<span>两新组织党组织</span>
	    	</div>
	    	<div class="child_btn" onclick="toOtherParty()">
	    		<img alt="其他辖区单位" src="/djzx/images/qtxqdw.jpg">
	    		<span>其他辖区单位</span>
	    	</div>
    	</div>
    </td>
    <!-- 主界面中心end -->
    <td width="1" height="500px" valign="top" background="/djzx/images/main_41.gif"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
    <td width="190" align="center" valign="top" background="/djzx/images/main_17.gif"><br>
      <table width="163" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="25"><img src="/djzx/images/main_30.gif" width="9" height="9" align="absmiddle"> <strong>个人信息</strong></td>
        </tr>
      </table>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="5"><img src="/djzx/images/main_65.gif" width="5" height="5"></td>
              <td background="/djzx/images/main_66.gif"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
              <td width="5"><img src="/djzx/images/main_69.gif" width="5" height="5"></td>
            </tr>
            <tr>
              <td background="/djzx/images/main_70.gif"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
              <td class="td06"><table width="100%" border="0" cellspacing="4" cellpadding="0">
                  <tr>
                    <td>${session.admin.name }，您好！<br>
                      欢迎登录天目西路街道“一网覆盖”党建信息化平台<br></td>
                  </tr>
              </table></td>
              <td background="/djzx/images/main_72.gif"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
            </tr>
            <tr>
              <td><img src="/djzx/images/main_80.gif" width="5" height="5"></td>
              <td background="/djzx/images/main_81.gif"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
              <td><img src="/djzx/images/main_82.gif" width="5" height="5"></td>
            </tr>
          </table>
          <br>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="25"><img src="/djzx/images/main_61.gif" width="9" height="9" align="absmiddle"> <strong>日历</strong></td>
            </tr>
            <tr>
              <td><table border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
                  <tr>
                    <td bgcolor="#FFFFFF"><script language="JavaScript">
<!-- Begin
var now = new Date();
var month_array = new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
document.write("<form name=date_list><table bgcolor=white border=0><tr><td>");
document.write("<select name=month onchange=change_month(this.options.selectedIndex)>");
for(var i=0;i<month_array.length;i++)
{
 if (now.getMonth() != i)
 {document.write ("<option value="+i+">"+month_array[i]);}
 else
 {document.write ("<option value="+i+" selected>"+month_array[i]);}

}
document.write("</select>");
document.write("</td><td>");
document.write ("<select name=year onchange=change_year(this.options[this.options.selectedIndex])>");
for(var i=2016;i<2100;i++)
{
 if (now.getFullYear() != i)
 {document.write("<option value="+i+">"+i);}
 else
 {document.write("<option value="+i+" selected>"+i);}
}
document.write("</select></td></tr><tr><td colspan=2><center>");

document.write("<table bgcolor=white border=0 cellspacing = 1 cellpading = 0 width=100%><tr bgcolor=666666 align=center>");
document.write("<td heigh=25 width=19 class=F02>M</td><td width=19 class=F02>T</td><td width=19 class=F02>W</td><td width=19 class=F02>T</td><td width=19 class=F02>F</td><td width=19 class=F03>S</td><td width=19 class=F03>S</td>");
document.write("</tr><tr>");
for(var j=0;j<6;j++)
{
 for(var i=0;i<7;i++)
 {
   document.write("<td bgcolor=EFEFEF align=center id=d"+i+"r"+j+"></td>")
 }
 document.write("</tr>");
}

document.write("</table>");

document.write("</center></from></td></tr></table>");

var show_date = new Date();

function set_cal(show_date)
{
	begin_day = new Date (show_date.getFullYear(),show_date.getMonth(),1);
	begin_day_date = begin_day.getDay();
	end_day = new Date (show_date.getFullYear(),show_date.getMonth()+1,1);
	count_day = (end_day - begin_day)/1000/60/60/24;
	input_table(begin_day_date,count_day);
}
// 设置日历为当前选择日期
set_cal(show_date);

// 生成日历
function input_table(begin, count)
{
	init();
	j = 0;
	// 设置当前选择的月份的一号是星期几
	if(begin == 0){
		i = 6;
	}else{
		i = begin - 1;
	}
	for (var c = 1; c < count + 1; c++)
	{
	 colum_name = eval("d" + i + "r" + j);
	 // 如果是当天
	 if ((now.getDate() == c)&&(show_date.getMonth() == now.getMonth())&&(show_date.getFullYear() == now.getFullYear())) 
	 {
		 colum_name.style.backgroundColor = "FF7700";colum_name.style.color = "white";
	 }
	 // 设置提醒日期
	 var nowYear = show_date.getFullYear();
	 var nowMonth;
	 if(now.getMonth() < 9){
		 nowMonth = "0" + (now.getMonth() + 1);
	 }else{
		 nowMonth = now.getMonth() + 1;
	 }
	 var nowDate;
	 if(c < 10){
		 nowDate = "0" + c;
	 }else{
		 nowDate = c;
	 }
	 var thisDate = nowYear + "-" + nowMonth + "-" + nowDate;
	 setRemindDate(thisDate);
	 colum_name.innerText = c;
	 i++;
	 if (i == 7){
		 i = 0;
		 j++;
	 }
	}
}

// 设置提醒日期为红色
function setRemindDate(date){
	$('#thisMonthRemind').children().each(function(){
		if(date == $(this).text()){
			colum_name.style.backgroundColor = "FF7700";
			colum_name.style.color = "red";
		}
	});
}

// 初始化日历表格
function init()
{
	for(var j=0;j<6;j++)
	{
		for(var i=0;i<7;i++)
		{
		 colum_name = eval("d"+i+"r"+j);
		 colum_name.innerText =  " ";
		 colum_name.style.backgroundColor = "";
		 colum_name.style.color = "";
		}
	}
}

// 月份改变
function change_month(sel_month)
{
	show_date = new Date(show_date.getFullYear(),sel_month,1);
	set_cal(show_date);
}

// 年份改变
function change_year(sel_year)
{
	sel_year = sel_year.value;
	show_date = new Date(sel_year,show_date.getMonth(),1);
	set_cal(show_date);
}
//  End -->
          </script></td>
                  </tr>
              </table></td>
            </tr>
          </table>  
          <br>
          <br>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
	          <tr>
	            <td width="5"><img src="/djzx/images/main_11.gif" width="5" height="5"></td>
	            <td background="/djzx/images/main_12.gif"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
	            <td width="5"><img src="/djzx/images/main_14.gif" width="5" height="5"></td>
	          </tr>
	          <tr>
	            <td background="/djzx/images/main_19.gif"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
	            <td align="center" class="td01">
	            <table width="95%" border="0" cellspacing="0" cellpadding="0">
	                <tr>
	                  <td height="25"><img src="/djzx/images/main_28.gif" width="9" height="9" align="absmiddle"> <strong>提醒信息</strong></td>
	                  <td width="35" align="right"><a href="/djzx/RemindAction!getRemindListForPage.action" target="mainFrame"><img src="/djzx/images/main_53.gif" width="35" height="9" border="0"></a></td>
	                </tr>
	                <tr>
	                  <td height="1" class="td05"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
	                  <td class="td05"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
	                </tr>
	                <tr>
	                  <td height="5"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
	                  <td><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
	                </tr>
	              </table>
	              <table width="95%" border="0" cellspacing="0" cellpadding="0">
	                  <tr>
	                    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
	                        <s:iterator value="remindList" var="r" status="statu">
		                        <tr>
		                          <td><img src="/djzx/images/index_57.gif" width="15" height="16"></td>
		                          <td valign="top" class="td08">
		                          	<a href="/djzx/RemindAction!toShowRemind.action?remind.timeKey=${r.timeKey }" target="_blank">
		                          	${r.name }  ${r.happenDate }</span>
		                          	</a>
		                          </td>
		                        </tr> 
	                        </s:iterator>
	                    </table></td>
	                  </tr>
	                </table>
	                <br></td>
	            <td background="/djzx/images/main_21.gif"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
	          </tr>
	          <tr>
	            <td><img src="/djzx/images/main_34.gif" width="5" height="5"></td>
	            <td background="/djzx/images/main_35.gif"><img src="/djzx/images/spacer.gif" width="1" height="1"></td>
	            <td><img src="/djzx/images/main_36.gif" width="5" height="5"></td>
	          </tr>
	      </table>
          </td>
  </tr>
</table>
</body>
</html>